home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global sound_is, resetSound
- if sound_is = 0 then
- soundOFF()
- end if
- if sound_is = 1 then
- soundON()
- end if
- EndAnyRollovers()
- set myFile to new(xtra("fileio"))
- set fileName to "r14text8.txt"
- openFile(myFile, fileName, 1)
- set err to status(myFile)
- if error(myFile, err) <> "OK" then
- alert("The File..." & fileName & " does not exist.")
- else
- set p to getPosition(myFile)
- set l to getLength(myFile)
- set theText to "x"
- repeat while getPosition(myFile) < l
- set theCastNum to readLine(myFile)
- set theCastNum to chars(theCastNum, 1, length(theCastNum) - 1)
- set x to setPosition(myFile, getPosition(myFile) + 1)
- set theNumLines to readLine(myFile)
- set theNumLines to chars(theNumLines, 1, length(theNumLines) - 1)
- repeat with i = 1 to value(theNumLines)
- set theText to readLine(myFile)
- set theText to chars(theText, 2, length(theText) - 1)
- if theText <> EMPTY then
- set theMemType to the type of member value(theCastNum)
- if (theMemType = #richText) or (theMemType = #field) then
- if i = 1 then
- set the text of member value(theCastNum) to theText
- else
- set t to the text of member value(theCastNum) & numToChar(13)
- set t to t & theText
- set the text of member value(theCastNum) to t
- end if
- else
- alert("Cast member " & value(theCastNum) & " is NOT a text cast member and will be skipped.")
- end if
- next repeat
- end if
- alert("We don't want to put a null string into cast member..." & value(theCastNum))
- end repeat
- set x to setPosition(myFile, getPosition(myFile) + 1)
- end repeat
- end if
- closeFile(myFile)
- set myFile to 0
- initWorldMap()
- end
-
- on stopMovie
- closeWorldMap()
- end
-
- on soundOFF
- global sound_is
- set sound_is to 0
- set the volume of sound 1 to 0
- set the volume of sound 2 to 0
- duplicate(member "soundoff", the number of member "sound")
- duplicate(member "soundoffroll", the number of member "soundroll")
- duplicate(member "soundoffpush", the number of member "soundpush")
- set the scriptText of member 12 to the text of member "soundrollt"
- set the scriptText of member 13 to the text of member "soundonPusht"
- puppetTransition(3, 0, 128)
- updateStage()
- set the name of member 11 to "sound"
- set the name of member 12 to "soundroll"
- set the name of member 13 to "soundPush"
- end
-
- on soundON
- global sound_is
- set sound_is to 1
- set the volume of sound 1 to 0
- set the volume of sound 2 to 255
- duplicate(member "soundon", the number of member "sound")
- duplicate(member "soundonroll", the number of member "soundroll")
- duplicate(member "soundonpush", the number of member "soundpush")
- set the scriptText of member 12 to the text of member "soundrollt"
- set the scriptText of member 13 to the text of member "soundoffPusht"
- puppetTransition(3, 0, 128)
- updateStage()
- set the name of member 11 to "sound"
- set the name of member 12 to "soundroll"
- set the name of member 13 to "soundPush"
- end
-
- on Pauseflash
- global resetSound
- set button1 to 45
- startTimer()
- repeat while the timer < (180 * 60)
- set the member of sprite button1 to member "pauseON"
- puppetTransition(3, 0, 128)
- updateStage()
- set timetick to the ticks
- repeat while the ticks < (timetick + 20)
- if the mouseDown then
- stopPause()
- exit
- end if
- end repeat
- set the member of sprite button1 to member "pauseRoll"
- puppetTransition(3, 0, 128)
- updateStage()
- set timetick to the ticks
- repeat while the ticks < (timetick + 20)
- if the mouseDown then
- stopPause()
- exit
- end if
- end repeat
- end repeat
- stopPause()
- end
-
- on stopPause
- global resetSound
- if resetSound = 1 then
- soundON()
- set resetSound to 0
- end if
- puppetSprite(45, 0)
- continue()
- end
-
- on enterFrame
- CheckForRollovers()
- end
-